/**
 * Description: 
 * version: 1.0
 * Author: Zero
 * Date: 2021-10-17 15:15:58
 * LastEditors: Zero
 * LastEditTime: 2021-10-21 22:16:35
 */
#include "PinCtrl.h"

void PinCtrlInit(void)
{
    //zero-initialize the config structure.
    gpio_config_t io_conf = {};
    //disable interrupt
    io_conf.intr_type = GPIO_INTR_DISABLE;
    //set as output mode
    io_conf.mode = GPIO_MODE_OUTPUT;
    //bit mask of the pins that you want to set,e.g.GPIO18/19
    io_conf.pin_bit_mask = VDF_PW_PIN_SEL | WIFI_SATA_PIN_SEL | DOT_PIN_SEL
                            | LED_R_PIN_SEL | LED_G_PIN_SEL | LED_B_PIN_SEL;
    //disable pull-down mode
    io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
    //disable pull-up mode
    io_conf.pull_up_en = GPIO_PULLDOWN_ENABLE;
    //configure GPIO with the given settings
    gpio_config(&io_conf);

    VDF_PW_EN;
    WIFI_SATA_DIS;
    DOT_DARK;
}